<?php

namespace app\common\model;

use think\Model;

class Discounts extends Model
{
    //获取当前上架的所有优惠券
    public function getDiscounts(){
        $where=[
            'surplus'=>['gt',0],
            'status'=>0
        ];
        $res=$this->where($where)->select();
        return $res;
    }
}